namespace ext.form
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>Provides a date input field with a {@link Ext.DatePicker} dropdown and automatic date validation.</summary>
	/// <definedin>src\widgets\form\DateField.js</definedin>
	[ScriptName("DateField")]
	[ScriptNamespace("Ext.form")]
	[Imported()]
	public partial class DateField : ext.form.TriggerField
	{
		
		#region Constructors
		/// <summary>Constructor</summary>
		/// <param name="config"></param>
		public DateField(ext.form.DateField_Configuration config)
		{
		}
		
		/// <summary>Constructor</summary>
		public DateField()
		{
		}
		#endregion
		
		#region Fields
		/// <summary>
		/// The default date format string which can be overriden for localization support. The format must be
		/// valid according to {@link Date#parseDate} (defaults to &apos;m/d/Y&apos;).
		/// </summary>
		/// <htmlSummary>
		/// The default date format string which can be overriden for localization support. The format must be
		/// valid according to {@link Date#parseDate} (defaults to &lt;tt&gt;&apos;m/d/Y&apos;&lt;/tt&gt;).
		/// </htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("format")]
		public string Format;
		
		/// <summary>
		/// Multiple date formats separated by &quot;|&quot; to try when parsing a user input value and it
		/// does not match the defined format (defaults to
		/// &apos;m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j&apos;).
		/// </summary>
		/// <htmlSummary>
		/// Multiple date formats separated by &quot;&lt;tt&gt;|&lt;/tt&gt;&quot; to try when parsing a user input value and it
		/// does not match the defined format (defaults to
		/// &lt;tt&gt;&apos;m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j&apos;&lt;/tt&gt;).
		/// </htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("altFormats")]
		public string AltFormats;
		
		/// <summary>The tooltip to display when the date falls on a disabled day (defaults to &apos;Disabled&apos;)</summary>
		/// <htmlSummary>The tooltip to display when the date falls on a disabled day (defaults to &lt;tt&gt;&apos;Disabled&apos;&lt;/tt&gt;)</htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("disabledDaysText")]
		public string DisabledDaysText;
		
		/// <summary>The tooltip text to display when the date falls on a disabled date (defaults to &apos;Disabled&apos;)</summary>
		/// <htmlSummary>The tooltip text to display when the date falls on a disabled date (defaults to &lt;tt&gt;&apos;Disabled&apos;&lt;/tt&gt;)</htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("disabledDatesText")]
		public string DisabledDatesText;
		
		/// <summary>
		/// The error text to display when the date in the cell is before {@link #minValue} (defaults to
		/// &apos;The date in this field must be after {minValue}&apos;).
		/// </summary>
		/// <htmlSummary>
		/// The error text to display when the date in the cell is before &lt;tt&gt;{@link #minValue}&lt;/tt&gt; (defaults to
		/// &lt;tt&gt;&apos;The date in this field must be after {minValue}&apos;&lt;/tt&gt;).
		/// </htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("minText")]
		public string MinText;
		
		/// <summary>
		/// The error text to display when the date in the cell is after {@link #maxValue} (defaults to
		/// &apos;The date in this field must be before {maxValue}&apos;).
		/// </summary>
		/// <htmlSummary>
		/// The error text to display when the date in the cell is after &lt;tt&gt;{@link #maxValue}&lt;/tt&gt; (defaults to
		/// &lt;tt&gt;&apos;The date in this field must be before {maxValue}&apos;&lt;/tt&gt;).
		/// </htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("maxText")]
		public string MaxText;
		
		/// <summary>
		/// The error text to display when the date in the field is invalid (defaults to
		/// &apos;{value} is not a valid date - it must be in the format {format}&apos;).
		/// </summary>
		/// <htmlSummary>
		/// The error text to display when the date in the field is invalid (defaults to
		/// &lt;tt&gt;&apos;{value} is not a valid date - it must be in the format {format}&apos;&lt;/tt&gt;).
		/// </htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("invalidText")]
		public string InvalidText;
		
		/// <summary>
		/// An additional CSS class used to style the trigger button. The trigger will always get the
		/// class &apos;x-form-trigger&apos; and triggerClass will be appended if specified
		/// (defaults to &apos;x-form-date-trigger&apos; which displays a calendar icon).
		/// </summary>
		/// <htmlSummary>
		/// An additional CSS class used to style the trigger button. The trigger will always get the
		/// class &lt;tt&gt;&apos;x-form-trigger&apos;&lt;/tt&gt; and &lt;tt&gt;triggerClass&lt;/tt&gt; will be &lt;b&gt;appended&lt;/b&gt; if specified
		/// (defaults to &lt;tt&gt;&apos;x-form-date-trigger&apos;&lt;/tt&gt; which displays a calendar icon).
		/// </htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("triggerClass")]
		public string TriggerClass;
		
		/// <summary>
		/// false to hide the footer area of the DatePicker containing the Today button and disable
		/// the keyboard handler for spacebar that selects the current date (defaults to true).
		/// </summary>
		/// <htmlSummary>
		/// &lt;tt&gt;false&lt;/tt&gt; to hide the footer area of the DatePicker containing the Today button and disable
		/// the keyboard handler for spacebar that selects the current date (defaults to &lt;tt&gt;true&lt;/tt&gt;).
		/// </htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("showToday")]
		public bool ShowToday;
		
		/// <summary>Day index at which the week should begin, 0-based (defaults to 0, which is Sunday)</summary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("startDay")]
		public System.Number StartDay;
		
		/// <summary>
		/// The minimum allowed date. Can be either a Javascript date object or a string date in a
		/// valid format (defaults to null).
		/// </summary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("minValue")]
		public ext.auto.System_DateTime_Or_System_String MinValue;
		
		/// <summary>
		/// The maximum allowed date. Can be either a Javascript date object or a string date in a
		/// valid format (defaults to null).
		/// </summary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("maxValue")]
		public ext.auto.System_DateTime_Or_System_String MaxValue;
		
		/// <summary>
		/// An array of days to disable, 0 based (defaults to null). Some examples: 
		/// // disable Sunday and Saturday:
		/// disabledDays: [0, 6]
		/// // disable weekdays:
		/// disabledDays: [1,2,3,4,5]
		/// </summary>
		/// <htmlSummary>
		/// An array of days to disable, 0 based (defaults to null). Some examples:&lt;pre&gt;&lt;code&gt;
		/// // disable Sunday and Saturday:
		/// disabledDays: [0, 6]
		/// // disable weekdays:
		/// disabledDays: [1,2,3,4,5]
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("disabledDays")]
		public System.Array DisabledDays;
		
		/// <summary>
		/// An array of &quot;dates&quot; to disable, as strings. These strings will be used to build a dynamic regular
		/// expression so they are very powerful. Some examples: 
		/// // disable these exact dates:
		/// disabledDates: [&quot;03/08/2003&quot;, &quot;09/16/2003&quot;]
		/// // disable these days for every year:
		/// disabledDates: [&quot;03/08&quot;, &quot;09/16&quot;]
		/// // only match the beginning (useful if you are using short years):
		/// disabledDates: [&quot;^03/08&quot;]
		/// // disable every day in March 2006:
		/// disabledDates: [&quot;03/../2006&quot;]
		/// // disable every day in every March:
		/// disabledDates: [&quot;^03&quot;]
		/// 
		/// Note that the format of the dates included in the array should exactly match the {@link #format} config.
		/// In order to support regular expressions, if you are using a {@link #format date format} that has &quot;.&quot; in
		/// it, you will have to escape the dot when restricting dates. For example: [&quot;03\\.08\\.03&quot;].
		/// </summary>
		/// <htmlSummary>
		/// An array of &quot;dates&quot; to disable, as strings. These strings will be used to build a dynamic regular
		/// expression so they are very powerful. Some examples:&lt;pre&gt;&lt;code&gt;
		/// // disable these exact dates:
		/// disabledDates: [&quot;03/08/2003&quot;, &quot;09/16/2003&quot;]
		/// // disable these days for every year:
		/// disabledDates: [&quot;03/08&quot;, &quot;09/16&quot;]
		/// // only match the beginning (useful if you are using short years):
		/// disabledDates: [&quot;^03/08&quot;]
		/// // disable every day in March 2006:
		/// disabledDates: [&quot;03/../2006&quot;]
		/// // disable every day in every March:
		/// disabledDates: [&quot;^03&quot;]
		/// &lt;/code&gt;&lt;/pre&gt;
		/// Note that the format of the dates included in the array should exactly match the {@link #format} config.
		/// In order to support regular expressions, if you are using a {@link #format date format} that has &quot;.&quot; in
		/// it, you will have to escape the dot when restricting dates. For example: &lt;tt&gt;[&quot;03\\.08\\.03&quot;]&lt;/tt&gt;.
		/// </htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("disabledDates")]
		public System.Array DisabledDates;
		
		/// <summary>
		/// A {@link Ext.DomHelper DomHelper element specification object}, or true for the default element
		/// specification object: 
		/// autoCreate: {tag: &quot;input&quot;, type: &quot;text&quot;, size: &quot;10&quot;, autocomplete: &quot;off&quot;}
		/// </summary>
		/// <htmlSummary>
		/// A {@link Ext.DomHelper DomHelper element specification object}, or &lt;tt&gt;true&lt;/tt&gt; for the default element
		/// specification object:&lt;pre&gt;&lt;code&gt;
		/// autoCreate: {tag: &quot;input&quot;, type: &quot;text&quot;, size: &quot;10&quot;, autocomplete: &quot;off&quot;}
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("autoCreate")]
		public ext.auto.System_String_Or_System_Object AutoCreate;
		
		/// <summary>Fires when a date is selected via the date picker.</summary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("selectEventName")]
		public const string SelectEventName = "select";
		
		/// <summary>@hide</summary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("grow")]
		public bool Grow;
		
		/// <summary>@hide</summary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("growMin")]
		public System.Number GrowMin;
		
		/// <summary>@hide</summary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("growMax")]
		public System.Number GrowMax;
		#endregion
		
		#region Methods
		/// <summary>Replaces any existing disabled dates with new values and refreshes the DatePicker.</summary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		/// <param name="disabledDates">
		/// An array of date strings (see the &lt;tt&gt;{@link #disabledDates}&lt;/tt&gt; config
		/// for details on supported values) used to disable a pattern of dates.
		/// </param>
		[ScriptName("setDisabledDates")]
		public void SetDisabledDates(System.Array disabledDates)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Replaces any existing disabled days (by index, 0-6) with new values and refreshes the DatePicker.</summary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		/// <param name="disabledDays">
		/// An array of disabled day indexes. See the &lt;tt&gt;{@link #disabledDays}&lt;/tt&gt;
		/// config for details on supported values.
		/// </param>
		[ScriptName("setDisabledDays")]
		public void SetDisabledDays(System.Array disabledDays)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Replaces any existing {@link #minValue} with the new value and refreshes the DatePicker.</summary>
		/// <htmlSummary>Replaces any existing &lt;tt&gt;{@link #minValue}&lt;/tt&gt; with the new value and refreshes the DatePicker.</htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		/// <param name="value">The minimum date that can be selected</param>
		[ScriptName("setMinValue")]
		public void SetMinValue(System.DateTime value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Replaces any existing {@link #maxValue} with the new value and refreshes the DatePicker.</summary>
		/// <htmlSummary>Replaces any existing &lt;tt&gt;{@link #maxValue}&lt;/tt&gt; with the new value and refreshes the DatePicker.</htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		/// <param name="value">The maximum date that can be selected</param>
		[ScriptName("setMaxValue")]
		public void SetMaxValue(System.DateTime value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Runs all of NumberFields validations and returns an array of any errors. Note that this first
		/// runs TextField&apos;s validations, so the returned array is an amalgamation of all field errors.
		/// The additional validation checks are testing that the date format is valid, that the chosen
		/// date is within the min and max date constraints set, that the date chosen is not in the disabledDates
		/// regex and that the day chosed is not one of the disabledDays.
		/// </summary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		/// <param name="value">The value to get errors for (defaults to the current field value)</param>
		/// <returns>All validation errors for this field</returns>
		[ScriptName("getErrors")]
		public System.Array GetErrors(object value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Returns the current date value of the date field.</summary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		/// <returns>The date value</returns>
		[ScriptName("getValue")]
		public System.DateTime GetValue()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Sets the value of the date field. You can pass a date object or any string that can be
		/// parsed into a valid date, using {@link #format} as the date format, according
		/// to the same rules as {@link Date#parseDate} (the default format used is &quot;m/d/Y&quot;).
		/// Usage:
		/// 
		/// //All of these calls set the same date value (May 4, 2006)
		///
		/// //Pass a date object:
		/// var dt = new Date(&apos;5/4/2006&apos;);
		/// dateField.setValue(dt);
		///
		/// //Pass a date string (default format):
		/// dateField.setValue(&apos;05/04/2006&apos;);
		///
		/// //Pass a date string (custom format):
		/// dateField.format = &apos;Y-m-d&apos;;
		/// dateField.setValue(&apos;2006-05-04&apos;);
		/// </summary>
		/// <htmlSummary>
		/// Sets the value of the date field. You can pass a date object or any string that can be
		/// parsed into a valid date, using &lt;tt&gt;{@link #format}&lt;/tt&gt; as the date format, according
		/// to the same rules as {@link Date#parseDate} (the default format used is &lt;tt&gt;&quot;m/d/Y&quot;&lt;/tt&gt;).
		/// &lt;br /&gt;Usage:
		/// &lt;pre&gt;&lt;code&gt;
		/// //All of these calls set the same date value (May 4, 2006)
		///
		/// //Pass a date object:
		/// var dt = new Date(&apos;5/4/2006&apos;);
		/// dateField.setValue(dt);
		///
		/// //Pass a date string (default format):
		/// dateField.setValue(&apos;05/04/2006&apos;);
		///
		/// //Pass a date string (custom format):
		/// dateField.format = &apos;Y-m-d&apos;;
		/// dateField.setValue(&apos;2006-05-04&apos;);
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		/// <param name="date">The date or valid date string</param>
		/// <returns>this</returns>
		[ScriptName("setValue")]
		public ext.form.Field SetValue(string date)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Sets the value of the date field. You can pass a date object or any string that can be
		/// parsed into a valid date, using {@link #format} as the date format, according
		/// to the same rules as {@link Date#parseDate} (the default format used is &quot;m/d/Y&quot;).
		/// Usage:
		/// 
		/// //All of these calls set the same date value (May 4, 2006)
		///
		/// //Pass a date object:
		/// var dt = new Date(&apos;5/4/2006&apos;);
		/// dateField.setValue(dt);
		///
		/// //Pass a date string (default format):
		/// dateField.setValue(&apos;05/04/2006&apos;);
		///
		/// //Pass a date string (custom format):
		/// dateField.format = &apos;Y-m-d&apos;;
		/// dateField.setValue(&apos;2006-05-04&apos;);
		/// </summary>
		/// <htmlSummary>
		/// Sets the value of the date field. You can pass a date object or any string that can be
		/// parsed into a valid date, using &lt;tt&gt;{@link #format}&lt;/tt&gt; as the date format, according
		/// to the same rules as {@link Date#parseDate} (the default format used is &lt;tt&gt;&quot;m/d/Y&quot;&lt;/tt&gt;).
		/// &lt;br /&gt;Usage:
		/// &lt;pre&gt;&lt;code&gt;
		/// //All of these calls set the same date value (May 4, 2006)
		///
		/// //Pass a date object:
		/// var dt = new Date(&apos;5/4/2006&apos;);
		/// dateField.setValue(dt);
		///
		/// //Pass a date string (default format):
		/// dateField.setValue(&apos;05/04/2006&apos;);
		///
		/// //Pass a date string (custom format):
		/// dateField.format = &apos;Y-m-d&apos;;
		/// dateField.setValue(&apos;2006-05-04&apos;);
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		/// <param name="date">The date or valid date string</param>
		/// <returns>this</returns>
		[ScriptName("setValue")]
		public ext.form.Field SetValue(System.DateTime date)
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
		
		#region Events
		/// <summary>Fires when a date is selected via the date picker.</summary>
		/// <definedin>src\widgets\form\DateField.js</definedin>
		[ScriptName("select")]
		public event ext.auto.Delegate_ext_form_DateField_And_System_DateTime Select;
		#endregion
	}
}
